﻿using System.Collections.Generic;
using UnityEngine;

[ExecuteInEditMode]
public class HK_Path : MonoBehaviour
{
    public List<Vector3> wayPoints = new List<Vector3>();

    [HideInInspector]
    public List<Vector3> wayPointsOffset = new List<Vector3>();

    void Awake()
    {
        wayPoints.Add(transform.position - transform.forward * 2);

        wayPointsOffset.Add(wayPoints[0] - transform.position);

        wayPoints.Add(transform.position + transform.forward * 2);

        wayPointsOffset.Add(wayPoints[1] - transform.position);
    }

#if UNITY_EDITOR
    void OnDrawGizmos()
    {
        if (wayPoints.Count < 2)
            return;

        Gizmos.color = Color.green;

        for (int i = 0; i < wayPoints.Count - 1; i++)
        {
            Gizmos.DrawLine(wayPoints[i], wayPoints[i + 1]);
        }
    }
#endif
}
